package org.uned.agonzalo16.bitacora.domain;

import com.googlecode.objectify.Ref;
import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Load;

@Entity
@Cache
public class Message extends BaseEntity {

	@Load
	@Index
	private Ref<User> origin;

	@Load
	@Index
	private Ref<User> destination;

	private String subject;

	private String content;

	public User getOrigin() {
		return origin.get();
	}

	public void setOrigin(User origin) {
		this.origin = Ref.create(origin);
	}

	public User getDestination() {
		return destination.get();
	}

	public void setDestination(User destination) {
		this.destination = Ref.create(destination);
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
